package com.bbs.dao;

import com.bbs.entity.Comment;
import com.bbs.entity.Reply;
import com.bbs.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {

    public List<User> listUserByHot();

    public List<User> listUserByTime();

    int insertUser(User user);

    User findById(Integer id);

    User findByEmail(@Param("email") String email);

    void activatUserById(@Param("id") int id);

    int updateUserPostCount(Reply reply);
    //点赞次数加1
    int updateUserLikeCount(Integer uid);
    //点赞次数减1
    int updateUserLikeCount2(Integer uid);
    //查询用户信息
    User selectUser(int uid);
    //更新用户信息
    void updateUser(User user);

    User loginSelectUser(String email);

    //编辑个人信息页面
    User xinxiuser(int uid);
}
